#ifndef _Material_H_
#define _Material_H_

#pragma once
#include "LightingRender.h"
#include "Ray.h"
#include "Color.h"

class Scene;
class IntersectResult;
class TraceState;

class Material {
protected:
	Float strength = 1.0;

public:
	Material() {}
	Material(Float strength) : strength(strength) {}
	virtual ~Material() {}

	virtual Color shade(const Scene *scene, const Ray &ray, const IntersectResult &intersect, const TraceState & traceState) const = 0;

	virtual bool isLuminous() const {
		return false;
	}
	virtual bool isTransparent() const {
		return false;
	}
	virtual Color getTransparentColor(const Scene * scene, const Ray & ray, const IntersectResult &intersect) const {
		return Colors::Black;
	}
	virtual void setStrength(Float strength) {
		this->strength = strength;
	}
};

#endif // _Material_H_